
class BaseClass {
    constructor(param = {}) {
        this.createParam(param);
    }

    createParam(param){
        this._param = Object.assign({}, this.getDefaultParam(), param);
    }

    get defaultParam() {
        return this.getDefaultParam();
    }

    getDefaultParam() {
        return {
            id: '',
            enabled: true,
            visible: true
        };
    }

    get param() {
        return this._param;
    }

    get id(){
        return this.param.id;
    }

    get enabled(){
        return this.param.enabled;
    }

    set enabled(value){
        if (this.param.enabled == value) return;
        this.param.enabled = value;
        this.changeEnabled();
    }

    changeEnabled(){
    }

    get visible(){
        return this.param.visible;
    }

    set visible(value){
        if (this.param.visible == value) return;
        this.param.visible = value;
        this.changeVisible();
    }

    changeVisible(){
    }

    async build(){

    }

    clear(){
    }

    getClassType() {
        return '';
    }


}


module.exports = BaseClass;
